-module(test).
-include("aleph_data_interface.hrl").
 

-export([test/0,test1/0]).
 
test()->
    crypto:start(),
    mnesia:start(), 
    rec_generator:generate(records,true),
    try
        test_aleph_server:set_up(),       
        aleph_config:format_system(),
        eunit:run([aleph_dht_session,test_aleph_process_labeler,
                   aleph_dht_session,aleph_dht_hash,aleph_dht_node,
                   test_aleph_dht_rpc,test_aleph_table],{suffix,"_test"})   
    after
       test_aleph_server:tear_down()
    end.

test1()->
    try
        aleph_server:start_link(test_app),
        aleph_process_labeler:label_application(test_app),        
        erlang:register(main_app,self()),
        aleph_log:start_link(),
        aleph_log:trace("log test"),
        aleph_log:trace("log test~p",[1])   
    after
        aleph_server:shutdown()
    end.


   
    



